package com.ztesoft.sca.dao.user;

import com.ztesoft.sca.model.user.ImPrivilegePo;
import com.ztesoft.sca.model.user.ImRolePo;

import java.util.List;

/**
 * @author liang.aozhao
 * @created 2018/5/16 9:41
 */
public interface ImRoleDao {
    long addImRole(ImRolePo imRolePo) throws Exception;

    void deleteImRole(ImRolePo imRolePo) throws Exception;

    void updateImRole(ImRolePo imRolePo) throws Exception;

    ImRolePo getImRole(ImRolePo imRolePo) throws Exception;

    List<ImRolePo> listAllImRoles() throws Exception;

    List<ImRolePo> listImRoleByUserId(Long userId) throws Exception;

    List<ImRolePo> listImRoleByOrgId(Long orgId) throws Exception;

    void addImRoleOrg(Long roleId, Long orgId) throws Exception;

    void deleteImRoleOrg(Long roleId, Long orgId) throws Exception;

    List<ImPrivilegePo> listImPrivilegeByRoleId(Long roleId) throws Exception;

}
